package com.snail.learn.security.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @RequestMapping("/test")
    @Secured("ROLE_admin")
    public String test(){
        return "test";
    }
}
